package com.vcaresolution.logistic.form;

import java.util.Set;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

import com.vcaresolution.logistic.pojo.User;

/**
 * <code>UserForm</code> represents User managemnet related fields.
 *
 * @author Snehal Shah
 * @version 1.0
 * @since ShipSoft 1.0
 */

@Component
public class UserForm extends User{
	
	private static final long serialVersionUID = 1L;

	private Integer securityQuestionId;
	private Integer companyId;
	private Integer userGroupId;
	private Set<Integer> branchId;
	private Set<Integer> departmentId;
	
	
	
	@NotNull
	public Integer getUserGroupId() {
		return userGroupId;
	}

	public void setUserGroupId(Integer userGroupId) {
		this.userGroupId = userGroupId;
	}
	
	
	@NotNull
	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public void setSecurityQuestionId(Integer securityQuestionId) {
		this.securityQuestionId = securityQuestionId;
	}

	@NotNull
	public Integer getSecurityQuestionId() {
		return securityQuestionId;
	}
	
	@Override
	@NotEmpty
	public String getUsername() {
		return super.getUsername();
	}
	
	@Override
	@NotEmpty
	public String getPassword() {
		return super.getPassword();
	}
	
	@Override
	@NotEmpty
	public String getFirstname() {
		return super.getFirstname();
	}
	
	@Override
	@NotEmpty
	public String getMiddlename() {
		return super.getMiddlename();
	}
	
	@Override
	@NotEmpty
	public String getLastname() {
		return super.getLastname();
	}
	
	@Override
	@NotEmpty
	public String getAddress() {
		return super.getAddress();
	}

	@Override
	@Digits(integer=10,fraction=0)
	public Long getCellno() {
		return super.getCellno();
	}

	@Override
	@Digits(integer=10,fraction=0)
	public Long getTeleno() {
		return super.getTeleno();
	}
	
	@Override
	@NotEmpty
	public String getEmail() {
		return super.getEmail();
	}
	
	
	@Override
	@NotEmpty
	public String getAnswer() {
		return super.getAnswer();
	}

	@Override
	public byte[] getPhoto() {
		return super.getPhoto();
	}

	public void setBranchId(Set<Integer> branchId) {
		this.branchId = branchId;
	}

	public Set<Integer> getBranchId() {
		return branchId;
	}

	public void setDepartmentId(Set<Integer> departmentId) {
		this.departmentId = departmentId;
	}

	public Set<Integer> getDepartmentId() {
		return departmentId;
	}
}
